Ext.define('XTFrame.view.ruiyuan.RecruitmentEditWindow', {
	extend: 'Ext.window.Window',
	alias: 'widget.ruiyuanRecruitmentEditWindow',
	requires: [ 'Ext.form.*' ],
	action: 'gridEditWindow',
	title: '招聘信息编辑',
	closeAction: 'hide',
	closable: false, 
	iconCls: 'edit-win',
	modal: true, 
	plain: true,
	resizable: false,
	height: 520,
	initComponent:function(){
		var me = this;
		var ifr = Ext.create('XTFrame.view.Iframe', {src:'/work/app/tool/richeditor/editor.jsp'});
		this.stateStore = Ext.create('Ext.data.Store', {
			fields: ['text', 'value'],
		    data : [{text: '有效', value: 1},
		    		{text: '无效', value: 0}]
		});
		Ext.apply(this,{
			items: [{
				xtype: 'form',
				width: 800,
				height: 100,
				border: false,
		        bodyPadding: 5,
		        frame: true,
		        layout: 'column',
				fieldDefaults: {
					labelAlign: 'right',
		            labelWidth: 60,
		            anchor: '98%'
				},
				items: [{
					xtype: 'textfield',
					name:'job_name',
					fieldLabel: '招聘职位',
					allowBlank:false,
					blankText:"不能为空，请填写",
					columnWidth: .5
				},{
					xtype: 'combo',
					name:'state',
					fieldLabel: '状态',
					store : this.stateStore,
					emptyText: '请选择',
					allowBlank: false,
					queryMode: 'local',
					displayField: 'text',
					valueField: 'value',
					value: 1,
					selectOnFocus:true,
					editable:false,
					columnWidth: .5
				},{
					xtype: 'textfield',
					name:'address',
					fieldLabel: '工作地点',
					columnWidth: .5
				},{
					xtype: 'textfield',
					name:'num',
					fieldLabel: '招聘人数',
					columnWidth: .5
				},{
			        xtype: 'hiddenfield',
			        name: 'job_id',
			        value: ''
			    },{
			        xtype: 'hiddenfield',
			        name: 'content',
			        value: ''
			    }],
				buttons: [{
					text:'保　存',
					action: 'gridEditSave',
					formBind: true
				},{
					text:'取　消',
					action: 'gridEditCancel'
				}]
			},ifr]
		});
		this.callParent(arguments);
	}
});